#import "WhisperKeyholeCell.h"


@implementation WhisperKeyholeCell

- (instancetype)initWithFrame:(CGRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		//self.contentView.backgroundColor = UIColor.whiteColor;
	}
	return self;
}

- (void)setNebulaUnveilQuicksilver:(WhisperKeyholeModel *)nebulaUnveilQuicksilver {
	_nebulaUnveilQuicksilver = nebulaUnveilQuicksilver;

	//: 配置cell的UI

	if (nebulaUnveilQuicksilver.idealGrin.count > 0) {
		[self.dreamArchiveJoyousImageView sd_setImageWithURL:[NSURL URLWithString:nebulaUnveilQuicksilver.idealGrin[0]] placeholderImage:nil];
	}

	self.delightRadiateFusionLabel.text = nebulaUnveilQuicksilver.journey;

}
//: 设置_nirvanaHarmonyImageView的圆角
- (void)harmonyXenialHover:(UIImageView *)questYearning echoQuestPrism:(CGFloat)rebirthDreamOracle {
	questYearning.layer.cornerRadius = rebirthDreamOracle;
	questYearning.layer.masksToBounds = YES;
}

- (UIImageView *)nirvanaHarmonyImageView {
	if (!_nirvanaHarmonyImageView) {
	
        _nirvanaHarmonyImageView = [UIImageView new];
        _nirvanaHarmonyImageView.contentMode = UIViewContentModeScaleAspectFill;
        _nirvanaHarmonyImageView.clipsToBounds = YES;
        //: UIImageView的骚操作 充数
        [self harmonyXenialHover:_nirvanaHarmonyImageView echoQuestPrism:3];
        UIImage *hazeNirvanaJeopardy = [UIImage imageNamed:@"images/image_8.png"];
        if (hazeNirvanaJeopardy) {
	        _nirvanaHarmonyImageView.image = hazeNirvanaJeopardy;
        }
	}
	return _nirvanaHarmonyImageView;
}

- (void)fusionInitUIKitView {

    //: 描述_0
    UIView *universe = [UIView new];
    universe.frame = CGRectMake(47, 18, 191, 165);
    self.joyousBlazeGratitudeView = universe;
    [self.contentView addSubview:universe];


    //: 描述_1
    self.embarkVolatileFlexibilityTextField = [UITextField new];
    self.embarkVolatileFlexibilityTextField.frame = CGRectMake(24, 20, 156, 154);
    [self.contentView addSubview:self.embarkVolatileFlexibilityTextField];


    //: 描述_2
    self.leapfrogPathwayWandererView = [UIView new];
    self.leapfrogPathwayWandererView.frame = CGRectMake(32, 39, 69, 111);
    [self.contentView addSubview:self.leapfrogPathwayWandererView];


    //: 描述_3
    self.dreamArchiveJoyousImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
    self.dreamArchiveJoyousImageView.contentMode = UIViewContentModeScaleAspectFill;
    self.dreamArchiveJoyousImageView.clipsToBounds = YES;
    self.dreamArchiveJoyousImageView.layer.cornerRadius = 6;
    self.dreamArchiveJoyousImageView.layer.masksToBounds = YES;
    self.dreamArchiveJoyousImageView.frame = CGRectMake(12, 3, 64, 96);
    UIImage *suspicionJeopardy = [UIImage imageNamed:@"images/image_3.png"];
    if (suspicionJeopardy) {
	    self.dreamArchiveJoyousImageView.image = suspicionJeopardy;
    }
    [self.contentView addSubview:self.dreamArchiveJoyousImageView];


    //: 描述_4
    UIView *xylophoneKaleidoscope = [UIView new];
    self.whisperView = xylophoneKaleidoscope;
    [self.contentView addSubview:xylophoneKaleidoscope];
	[self.whisperView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(63);
		make.height.mas_equalTo(79);
		make.top.equalTo(@(11));
		make.bottom.equalTo(@(30));
	}];


    //: 描述_5
    self.oasisView = [[UIView alloc] initWithFrame:CGRectZero];
    self.oasisView.frame = CGRectMake(46, 31, 173, 181);
    [self.contentView addSubview:self.oasisView];


    //: 描述_6
    self.dreamscapeLeapTextField = [[UITextField alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:self.dreamscapeLeapTextField];
	[self.dreamscapeLeapTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(188);
		make.height.mas_equalTo(64);
		make.bottom.equalTo(@(18));
	}];


    //: 描述_7
    self.delightRadiateFusionLabel = [UILabel new];
    self.delightRadiateFusionLabel.text = @"label_7";
    self.delightRadiateFusionLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
    self.delightRadiateFusionLabel.textColor = [UIColor colorWithRed:141/255.0 green:23/255.0 blue:147/255.0 alpha:0.9];
    self.delightRadiateFusionLabel.textAlignment = NSTextAlignmentRight;
    //: 不用理会的骚操作 = self.delightRadiateFusionLabel.numberOfLines = 1;
    NSInteger curiosityWonder = 1;
    if (curiosityWonder>26 && curiosityWonder < 3847) {
	    curiosityWonder = 15;
    }
    self.delightRadiateFusionLabel.numberOfLines = curiosityWonder;
    [self.contentView addSubview:self.delightRadiateFusionLabel];
	[self.delightRadiateFusionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(105);
		make.height.mas_equalTo(178);
		make.top.equalTo(@(10));
	}];

	//: 描述_8
	[self.contentView addSubview:self.nirvanaHarmonyImageView];
	[self.nirvanaHarmonyImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(56);
		make.height.mas_equalTo(99);
		make.bottom.equalTo(@(30));
	}];
}


@end